package com.qf.index;

import cn.hutool.db.Db;

import java.sql.SQLException;

public class CreateTable {

    public static void main(String[] args) throws SQLException {


        String newDataName = "scholar_25_05";
        String batch = "0406";
        createSummaryTable(newDataName, batch);
        createSummaryFinalTable(newDataName, batch);
        createSummaryTypeTable(newDataName, batch);
        createFullAbbrKeyWordTable(newDataName, batch);
        createKeyWordSumTable(newDataName, batch);
        createBibPmTable(newDataName, batch);
        createBibUtTable(newDataName, batch);
        createBibAidTable(newDataName, batch);
        createNcTextTopTable(newDataName, batch);

    }


    public static void createNcTextTopTable(String newDataName, String batch) throws SQLException {
        String sql = "CREATE TABLE `nc_text_table_top_" + batch + "` (\n" +
                "  `id` int(10) NOT NULL AUTO_INCREMENT,\n" +
                "  `aidList` longtext,\n" +
                "  `mhList` longtext,\n" +
                "  `isList` longtext,\n" +
                "  `ptList` longtext,\n" +
                "  `rnList` longtext,\n" +
                "  `otList` longtext,\n" +
                "  `laList` longtext,\n" +
                "  `plList` longtext,\n" +
                "  `lidList` longtext,\n" +
                "  `grList` longtext,\n" +
                "  `siList` longtext,\n" +
                "  `oidList` longtext,\n" +
                "  `conList` longtext,\n" +
                "  `cinList` longtext,\n" +
                "  `cnList` longtext,\n" +
                "  `einList` longtext,\n" +
                "  `gnList` longtext,\n" +
                "  `iradList` longtext,\n" +
                "  `efrList` longtext,\n" +
                "  `gsList` longtext,\n" +
                "  `pbList` longtext,\n" +
                "  `uofList` longtext,\n" +
                "  `uinList` longtext,\n" +
                "  `rofList` longtext,\n" +
                "  `rinList` longtext,\n" +
                "  `sfmList` longtext,\n" +
                "  `isbnList` longtext,\n" +
                "  `rpfList` longtext,\n" +
                "  `rpiList` longtext,\n" +
                "  `ecfList` longtext,\n" +
                "  `eciList` longtext,\n" +
                "  `crfList` longtext,\n" +
                "  `criList` longtext,\n" +
                "  `oriList` longtext,\n" +
                "  `spinList` longtext,\n" +
                "  `drinList` longtext,\n" +
                "  `ddinList` longtext,\n" +
                "  `rrfList` longtext,\n" +
                "  `auList` longtext,\n" +
                "  `phstList` longtext,\n" +
                "  `stat` text,\n" +
                "  `dp` text,\n" +
                "  `crdt` text,\n" +
                "  `edat` text,\n" +
                "  `ti` text,\n" +
                "  `so` text,\n" +
                "  `jt` text,\n" +
                "  `pst` text,\n" +
                "  `jid` varchar(9) DEFAULT NULL,\n" +
                "  `lr` text,\n" +
                "  `own` text,\n" +
                "  `mhda` text,\n" +
                "  `ta` varchar(35) DEFAULT NULL,\n" +
                "  `pmid` int(8) DEFAULT NULL,\n" +
                "  `vi` text,\n" +
                "  `pg` text,\n" +
                "  `dcom` text,\n" +
                "  `ip` text,\n" +
                "  `sb` text,\n" +
                "  `ab` text,\n" +
                "  `dep` text,\n" +
                "  `oto` text,\n" +
                "  `pmc` text,\n" +
                "  `pmcr` text,\n" +
                "  `ci` text,\n" +
                "  `cois` text,\n" +
                "  `ir` text,\n" +
                "  `fir` text,\n" +
                "  `tt` text,\n" +
                "  `rf` text,\n" +
                "  `mid` text,\n" +
                "  `fps` text,\n" +
                "  `ps` text,\n" +
                "  `oab` text,\n" +
                "  `oabl` text,\n" +
                "  `fed` text,\n" +
                "  `ed` text,\n" +
                "  `bti` text,\n" +
                "  `ctdt` text,\n" +
                "  `cti` text,\n" +
                "  `cp` text,\n" +
                "  `drdt` text,\n" +
                "  `en` text,\n" +
                "  `rriList` longtext,\n" +
                "  `bao_jid` int(9) DEFAULT NULL,\n" +
                "  `datetime` datetime DEFAULT NULL,\n" +
                "  PRIMARY KEY (`id`),\n" +
                "  KEY `pmid` (`pmid`),\n" +
                "  KEY `bao_jid` (`bao_jid`),\n" +
                "  KEY `jid` (`jid`),\n" +
                "  KEY `ta` (`ta`)\n" +
                ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;";
        Db.use().execute("use " + newDataName + ";");
        try {
            Db.use().execute(sql);
            System.out.println("表创建成功：" + " nc_text_table_top_" + batch);
        } catch (SQLException e) {
//            throw new RuntimeException(e);
        }
    }

    public static void createBibAidTable(String newDataName, String batch) throws SQLException {
        String sql = "CREATE TABLE `bibliometric_aid_" + batch + "` (\n" +
                "  `id` int(9) NOT NULL AUTO_INCREMENT,\n" +
                "  `pmid` int(8) DEFAULT NULL,\n" +
                "  `info` longtext,\n" +
                "  `aid` int(9) DEFAULT NULL,\n" +
                "  `ut` varchar(20) DEFAULT NULL,\n" +
                "  `is_core` int(1) DEFAULT NULL COMMENT '是否为核心，有ut号为1，否为0',\n" +
                "  PRIMARY KEY (`id`),\n" +
                "  KEY `pmid` (`pmid`),\n" +
                "  KEY `ut` (`ut`),\n" +
                "  KEY `is_core` (`is_core`),\n" +
                "  KEY `aid` (`aid`)\n" +
                ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;";
        Db.use().execute("use " + newDataName + ";");
        try {
            Db.use().execute(sql);
            System.out.println("表创建成功：" + " bibliometric_aid_" + batch);
        } catch (SQLException e) {
//            throw new RuntimeException(e);
        }
    }

    public static void createBibUtTable(String newDataName, String batch) throws SQLException {
        String sql = "CREATE TABLE `bibliometric_ut_" + batch + "` (\n" +
                "  `id` int(9) NOT NULL AUTO_INCREMENT,\n" +
                "  `ut` varchar(15) DEFAULT NULL,\n" +
                "  `info` longtext,\n" +
                "  PRIMARY KEY (`id`),\n" +
                "  KEY `ut` (`ut`)\n" +
                ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;";
        Db.use().execute("use " + newDataName + ";");
        try {
            Db.use().execute(sql);
            System.out.println("表创建成功：" + " bibliometric_ut_" + batch);
        } catch (SQLException e) {
//            throw new RuntimeException(e);
        }
    }

    public static void createBibPmTable(String newDataName, String batch) throws SQLException {
        String sql = "CREATE TABLE `bibliometric_pm_" + batch + "` (\n" +
                "  `id` int(9) NOT NULL AUTO_INCREMENT,\n" +
                "  `pmid` int(8) DEFAULT NULL,\n" +
                "  `info` longtext,\n" +
                "  PRIMARY KEY (`id`),\n" +
                "  KEY `pmid` (`pmid`)\n" +
                ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;";
        Db.use().execute("use " + newDataName + ";");
        try {
            Db.use().execute(sql);
            System.out.println("表创建成功：" + " bibliometric_pm_" + batch);
        } catch (SQLException e) {
//            throw new RuntimeException(e);
        }
    }

    public static void createKeyWordSumTable(String newDataName, String batch) throws SQLException {
        String sql = "CREATE TABLE `key_word_sum_" + batch + "` (\n" +
                "  `id` int(10) NOT NULL AUTO_INCREMENT,\n" +
                "  `key_word` text,\n" +
                "  `is_cn` int(1) DEFAULT NULL COMMENT '如果是中文为1，否为0',\n" +
                "  `sum` int(9) DEFAULT NULL,\n" +
                "  `size` int(9) DEFAULT NULL,\n" +
                "  PRIMARY KEY (`id`),\n" +
                "  KEY `size` (`size`)\n" +
                ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;";
        Db.use().execute("use " + newDataName + ";");
        try {
            Db.use().execute(sql);
            System.out.println("表创建成功：" + " key_word_sum_" + batch);
        } catch (SQLException e) {
//            throw new RuntimeException(e);
        }
    }

    public static void createFullAbbrKeyWordTable(String newDataName, String batch) throws SQLException {
        String sql = "CREATE TABLE `full_abbr_key_word_" + batch + "` (\n" +
                "  `id` int(9) NOT NULL AUTO_INCREMENT,\n" +
                "  `original` text COMMENT '原始的句子，程序中是以点加空格进行分隔的',\n" +
                "  `full` text COMMENT '全写的词组',\n" +
                "  `abbr` text COMMENT '缩写的单词',\n" +
                "  `is_ok` int(1) DEFAULT NULL COMMENT '全写的词组与缩写的单词之间匹配为1，否则为0',\n" +
                "  `date` datetime DEFAULT NULL,\n" +
                "  `aid` int(9) DEFAULT NULL COMMENT '论文表中的自增主键',\n" +
                "  `pmId` int(8) DEFAULT NULL COMMENT 'pmId号',\n" +
                "  `ut` varchar(15) DEFAULT NULL COMMENT '15位的ut号',\n" +
                "  PRIMARY KEY (`id`),\n" +
                "  KEY `is_ok` (`is_ok`)\n" +
                ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='词组后面有括号，通过括号提取词组';";
        Db.use().execute("use " + newDataName + ";");
        try {
            Db.use().execute(sql);
            System.out.println("表创建成功：" + " full_abbr_key_word_" + batch);
        } catch (SQLException e) {
//            throw new RuntimeException(e);
        }
    }

    public static void createSummaryTypeTable(String newDataName, String batch) throws SQLException {
        String sql = "CREATE TABLE `unified_search_summary_" + batch + "_type` (\n" +
                "  `id` int(9) NOT NULL AUTO_INCREMENT,\n" +
                "  `type` int(1) DEFAULT NULL COMMENT '类型分4种，1:中国医院，2:指南，3:pubmed，4:自2019年以来',\n" +
                "  `stem_fudan` int(1) DEFAULT NULL COMMENT '分两种，1:STEM专科，2:复旦排行榜学科',\n" +
                "  `dept` text COMMENT 'STEM专科或复旦排行榜学科的名称，最长11位',\n" +
                "  `id_list` longtext COMMENT 'id号的集合，此id是pm_ut_aid_info表的自增主键，不是老鲍表的',\n" +
                "  `id_sum` int(9) DEFAULT NULL COMMENT '不重复的id号的数量，此id也是pm_ut_aid_info表的自增主键',\n" +
                "  `key_word` longtext COMMENT '全部的相关的关键词，注意里面的aidList是老鲍表的自增主键',\n" +
                "  `auth` longtext COMMENT '全部的相关的作者',\n" +
                "  `unit` longtext COMMENT '全部的相关的机构',\n" +
                "  `journal` longtext COMMENT '全部的相关的期刊，注意这里使用的期刊是期刊的唯一id号:jid，不是期刊名称',\n" +
                "  `key_word_20` longtext COMMENT '前20的关键词',\n" +
                "  `auth_20` longtext COMMENT '前20的作者',\n" +
                "  `unit_20` longtext COMMENT '前20的机构',\n" +
                "  `journal_20` longtext COMMENT '前20的期刊',\n" +
                "  PRIMARY KEY (`id`),\n" +
                "  KEY `type` (`type`),\n" +
                "  KEY `stem_fudan` (`stem_fudan`)\n" +
                ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;";
        Db.use().execute("use " + newDataName + ";");
        try {
            Db.use().execute(sql);
            System.out.println("表创建成功：" + " unified_search_summary_" + batch + "_type");
        } catch (SQLException e) {
//            throw new RuntimeException(e);
        }
    }

    public static void createSummaryFinalTable(String newDataName, String batch) throws SQLException {
        String sql = "CREATE TABLE `unified_search_summary_" + batch + "` (\n" +
                "  `id` int(10) NOT NULL AUTO_INCREMENT,\n" +
                "  `cscd_id` int(9) DEFAULT NULL,\n" +
                "  `ncbi_id` int(9) DEFAULT NULL,\n" +
                "  `yiigle_id` int(9) DEFAULT NULL,\n" +
                "  `wos_id` int(9) DEFAULT NULL,\n" +
                "  `weipu_id` int(9) DEFAULT NULL,\n" +
                "  `wanfang_id` int(9) DEFAULT NULL,\n" +
                "  `cnki_id` int(9) DEFAULT NULL,\n" +
                "  `journal` text COMMENT '期刊的名称',\n" +
                "  `aid` int(9) DEFAULT NULL COMMENT '因与原表字段重名，pid改为aid，论文的唯一主键，使用老鲍的论文基础表中的自增主键',\n" +
                "  `citation_quota` double DEFAULT NULL COMMENT '引文的质量（按中科院分区表）',\n" +
                "  `reference_quota` double DEFAULT NULL COMMENT '参文的质量',\n" +
                "  `title` text COMMENT '论文的原始标题',\n" +
                "  `keyword` longtext COMMENT '论文的原始关键词',\n" +
                "  `ab` longtext COMMENT '论文的原始摘要',\n" +
                "  `key_word_list` longtext COMMENT '关键词集合，此是基于标题、摘要、关键词三处的整合',\n" +
                "  `key_word_all` longtext,\n" +
                "  `ti_key` text COMMENT '从标题中提取的关键词',\n" +
                "  `kw_key` longtext COMMENT '从关键词中提取的关键词(若是主题词给予转换)',\n" +
                "  `ab_key` longtext COMMENT '从摘要中提取的关键词',\n" +
                "  `abb_word` longtext COMMENT '从简写中提取出来的关键词（是一对）',\n" +
                "  `zky_dalei` int(1) DEFAULT NULL COMMENT '中科院的期刊分区表最佳的大类',\n" +
                "  `jcr_if` double DEFAULT NULL COMMENT 'jcr(scie)期刊影响因子',\n" +
                "  `year` int(4) DEFAULT NULL COMMENT '论文的出版年',\n" +
                "  `mesh` text COMMENT 'PubMed的主题词表，含主题词和副主题词',\n" +
                "  `jid` int(9) DEFAULT NULL COMMENT '期刊的唯一id号，此为期刊关联表的自增主键',\n" +
                "  `discussion` longtext COMMENT '摘要提取出来的特定字段',\n" +
                "  `results` longtext COMMENT '摘要提取出来的特定字段',\n" +
                "  `methods` longtext COMMENT '摘要提取出来的特定字段',\n" +
                "  `background` longtext COMMENT '摘要提取出来的特定字段',\n" +
                "  `c1_au` longtext COMMENT 'wos表中的c1或其它表中的作者及单位信息，对应实体类En.C1Auth',\n" +
                "  `rp_au` longtext COMMENT 'wos表中的rp字段，，对应实体类En.C1Auth',\n" +
                "  `cite` longtext COMMENT '参文格式（NLM、APA、MLA、AMA四种）',\n" +
                "  `cn_ti` text COMMENT '中文的文献标题',\n" +
                "  `cn_ab` longtext COMMENT '中文的文献摘要',\n" +
                "  `cn_kw` longtext COMMENT '中文的文献关键词',\n" +
                "  `cn_type` text COMMENT '中文的文献的类型，综述等',\n" +
                "  `pt` text COMMENT '英文的文献的类型，综述等，是一个集合',\n" +
                "  `is_cns` int(1) DEFAULT NULL COMMENT '六大顶级刊，是为1，否为0',\n" +
                "  `pmId` int(8) DEFAULT NULL COMMENT '最大8位的pmId号',\n" +
                "  `ut` varchar(15) DEFAULT NULL COMMENT '此为15位的UT号',\n" +
                "  `doi` text COMMENT 'doi号集合',\n" +
                "  `nlmId` varchar(25) DEFAULT NULL COMMENT 'nlmId号，无其它字符',\n" +
                "  `cite_score` double DEFAULT NULL COMMENT '期刊citeScore影响因子值',\n" +
                "  `jcr_quartile` int(1) DEFAULT NULL COMMENT 'jcr(scie)期刊分区',\n" +
                "  `fund_list` longtext COMMENT '从原始基金信息中提供出来的基金名称，待规范。',\n" +
                "  `drug_gene_pathway_disease` longtext COMMENT '药物、基因、通路、疾病',\n" +
                "  `auth` longtext COMMENT '原始的作者信息，全写',\n" +
                "  `info` longtext COMMENT '期刊、年、卷、期、页码信息',\n" +
                "  `is_retraction` int(1) DEFAULT NULL COMMENT '是否是撤稿，是为1，否为0；',\n" +
                "  `is_china` int(1) DEFAULT NULL COMMENT '是否是中国人发表的，是为1，否为0；',\n" +
                "  `cn_discussion` longtext COMMENT '中文摘要提取出来的特定字段',\n" +
                "  `cn_results` longtext COMMENT '中文摘要提取出来的特定字段',\n" +
                "  `cn_methods` longtext COMMENT '中文摘要提取出来的特定字段',\n" +
                "  `cn_background` longtext COMMENT '中文摘要提取出来的特定字段',\n" +
                "  `cs_sjr` double DEFAULT NULL COMMENT '期刊citescore声望指数',\n" +
                "  `is_beida` int(1) DEFAULT NULL COMMENT '是否北大核心期刊收录，是为1，否为0',\n" +
                "  `is_cs` int(1) DEFAULT NULL COMMENT '是否威望指数SJR期刊收录，是为1，否为0',\n" +
                "  `is_cscd` int(1) DEFAULT NULL COMMENT '是否CSCD期刊收录，是为1，否为0',\n" +
                "  `is_jcr` int(1) DEFAULT NULL COMMENT '是否是sci收录期刊',\n" +
                "  `is_pubmed` int(1) DEFAULT NULL COMMENT '是否PubMed期刊收录，是为1，否为0',\n" +
                "  `is_tjy` int(1) DEFAULT NULL COMMENT '是否统计源期刊收录，是为1，否为0',\n" +
                "  `is_yiigle` int(1) DEFAULT NULL COMMENT '中华医学系列收录',\n" +
                "  `is_zky` int(1) DEFAULT NULL COMMENT '是否中科院期刊收录，是为1，否为0',\n" +
                "  `zky_subject` text COMMENT '中科院大区名称',\n" +
                "  `is_core` int(1) DEFAULT NULL COMMENT '核心1，非核心0',\n" +
                "  `mail_list` text COMMENT '邮箱信息，是一个集合',\n" +
                "  `subject` text COMMENT '用于数据分析时的学科字段，类型与WOS中的WC字段，可代替wos_wc字段',\n" +
                "  `kw_plus` text COMMENT '类似wos中的Keywords Plus关键词ID字段，用于数据分析',\n" +
                "  `times_cited` int(11) DEFAULT NULL COMMENT '被引次数，这个TC是泉方计算出来的，不是WOS的TC数据',\n" +
                "  `language` text COMMENT '论文的语种',\n" +
                "  `references` longtext COMMENT '参考文献的pid集合',\n" +
                "  `citations` longtext COMMENT '施引文献的pid集合',\n" +
                "  `is_china_hosp` int(1) DEFAULT NULL COMMENT '是否中国医院论文，是为1',\n" +
                "  `is_guidelines` int(1) DEFAULT NULL COMMENT '是否pubmed收录的临床指南论文，是为1',\n" +
                "  `is_pubmed_article` int(1) DEFAULT NULL COMMENT '是否是pubmed收录的论文，是为1',\n" +
                "  `is_6year` int(1) DEFAULT NULL COMMENT '是否是自2019年以来的论文，是为1',\n" +
                "  `pm_ad` longtext COMMENT 'PubMed的作者地址信息集合即AD字段',\n" +
                "  `ncbi_subject` longtext COMMENT 'ncbi的期刊学科',\n" +
                "  `ncbi_journal` text COMMENT 'ncbi的abbr期刊',\n" +
                "  `ncbi_mesh` longtext COMMENT 'ncbi的期刊mesh',\n" +
                "  `web_site` text COMMENT 'doi号跳转后的主域名，用于出版社统计',\n" +
                "  `cn_country` text COMMENT '发文国家的中文名称的List集合',\n" +
                "  `early_warning` int(1) DEFAULT NULL COMMENT '是否2024中科院版的预警期刊，是为1，否为0',\n" +
                "  `is_fund` int(1) DEFAULT NULL COMMENT '是否是历史基金论文',\n" +
                "  `fund_auth` longtext COMMENT '历史基金论文的作者信息',\n" +
                "  `url` longtext COMMENT '四个数据库的url',\n" +
                "  PRIMARY KEY (`id`),\n" +
                "  KEY `aid` (`aid`),\n" +
                "  KEY `pmId` (`pmId`),\n" +
                "  KEY `ut` (`ut`),\n" +
                "  KEY `jid` (`jid`),\n" +
                "  KEY `is_china_hosp` (`is_china_hosp`),\n" +
                "  KEY `is_guidelines` (`is_guidelines`),\n" +
                "  KEY `is_6year` (`is_6year`),\n" +
                "  KEY `is_pubmed_article` (`is_pubmed_article`),\n" +
                "  KEY `is_fund` (`is_fund`)\n" +
                ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;";
        Db.use().execute("use " + newDataName + ";");
        try {
            Db.use().execute(sql);
            System.out.println("表创建成功：" + " unified_search_summary_" + batch);
        } catch (SQLException e) {
//            throw new RuntimeException(e);
        }
    }

    public static void createSummaryTable(String newDataName, String batch) throws SQLException {
        String sql = "CREATE TABLE `unified_search_summary_" + batch + "_temp` (\n" +
                "  `id` int(10) NOT NULL AUTO_INCREMENT,\n" +
                "  `cscd_id` int(9) DEFAULT NULL,\n" +
                "  `ncbi_id` int(9) DEFAULT NULL,\n" +
                "  `yiigle_id` int(9) DEFAULT NULL,\n" +
                "  `wos_id` int(9) DEFAULT NULL,\n" +
                "  `weipu_id` int(9) DEFAULT NULL,\n" +
                "  `wanfang_id` int(9) DEFAULT NULL,\n" +
                "  `cnki_id` int(9) DEFAULT NULL,\n" +
                "  `key_word_list` longtext COMMENT '关键词集合，此是基于标题、摘要、关键词三处的整合',\n" +
                "  `journal` text COMMENT '期刊的名称',\n" +
                "  `aid` int(9) DEFAULT NULL COMMENT '因与原表字段重名，pid改为aid，论文的唯一主键，使用老鲍的论文基础表中的自增主键',\n" +
                "  `citation_quota` double DEFAULT NULL COMMENT '引文的质量（按中科院分区表）',\n" +
                "  `reference_quota` double DEFAULT NULL COMMENT '参文的质量',\n" +
                "  `ti_key` text COMMENT '从标题中提取的关键词',\n" +
                "  `ab_key` longtext COMMENT '从摘要中提取的关键词',\n" +
                "  `kw_key` longtext COMMENT '从关键词中提取的关键词(若是主题词给予转换)',\n" +
                "  `abb_word` longtext COMMENT '从简写中提取出来的关键词（是一对）',\n" +
                "  `zky_dalei` int(1) DEFAULT NULL COMMENT '中科院的期刊分区表最佳的大类',\n" +
                "  `jcr_if` double DEFAULT NULL COMMENT 'jcr(scie)期刊影响因子',\n" +
                "  `year` int(4) DEFAULT NULL COMMENT '论文的出版年',\n" +
                "  `title` text COMMENT '论文的原始标题',\n" +
                "  `keyword` longtext COMMENT '论文的原始关键词',\n" +
                "  `ab` longtext COMMENT '论文的原始摘要',\n" +
                "  `mesh` text COMMENT 'PubMed的主题词表，含主题词和副主题词',\n" +
                "  `jid` int(9) DEFAULT NULL COMMENT '期刊的唯一id号，此为期刊关联表的自增主键',\n" +
                "  `discussion` longtext COMMENT '摘要提取出来的特定字段',\n" +
                "  `results` longtext COMMENT '摘要提取出来的特定字段',\n" +
                "  `methods` longtext COMMENT '摘要提取出来的特定字段',\n" +
                "  `background` longtext COMMENT '摘要提取出来的特定字段',\n" +
                "  `c1_au` longtext COMMENT 'wos表中的c1或其它表中的作者及单位信息，对应实体类En.C1Auth',\n" +
                "  `rp_au` longtext COMMENT 'wos表中的rp字段，，对应实体类En.C1Auth',\n" +
                "  `cite` longtext COMMENT '参文格式（NLM、APA、MLA、AMA四种）',\n" +
                "  `cn_ti` text COMMENT '中文的文献标题',\n" +
                "  `cn_ab` longtext COMMENT '中文的文献摘要',\n" +
                "  `cn_kw` longtext COMMENT '中文的文献关键词',\n" +
                "  `cn_type` text COMMENT '中文的文献的类型，综述等',\n" +
                "  `pt` text COMMENT '英文的文献的类型，综述等，是一个集合',\n" +
                "  `is_cns` int(1) DEFAULT NULL COMMENT '六大顶级刊，是为1，否为0',\n" +
                "  `pmId` int(8) DEFAULT NULL COMMENT '最大8位的pmId号',\n" +
                "  `ut` varchar(15) DEFAULT NULL COMMENT '此为15位的UT号',\n" +
                "  `doi` text COMMENT 'doi号集合',\n" +
                "  `nlmId` varchar(25) DEFAULT NULL COMMENT 'nlmId号，无其它字符',\n" +
                "  `cite_score` double DEFAULT NULL COMMENT '期刊citeScore影响因子值',\n" +
                "  `jcr_quartile` int(1) DEFAULT NULL COMMENT 'jcr(scie)期刊分区',\n" +
                "  `fund_list` longtext COMMENT '从原始基金信息中提供出来的基金名称，待规范。',\n" +
                "  `drug_gene_pathway_disease` longtext COMMENT '药物、基因、通路、疾病',\n" +
                "  `auth` longtext COMMENT '原始的作者信息，全写',\n" +
                "  `info` longtext COMMENT '期刊、年、卷、期、页码信息',\n" +
                "  `is_retraction` int(1) DEFAULT NULL COMMENT '是否是撤稿，是为1，否为0；',\n" +
                "  `is_china` int(1) DEFAULT NULL COMMENT '是否是中国人发表的，是为1，否为0；',\n" +
                "  `cn_discussion` longtext COMMENT '中文摘要提取出来的特定字段',\n" +
                "  `cn_results` longtext COMMENT '中文摘要提取出来的特定字段',\n" +
                "  `cn_methods` longtext COMMENT '中文摘要提取出来的特定字段',\n" +
                "  `cn_background` longtext COMMENT '中文摘要提取出来的特定字段',\n" +
                "  `cs_sjr` double DEFAULT NULL COMMENT '期刊citescore声望指数',\n" +
                "  `is_beida` int(1) DEFAULT NULL COMMENT '是否北大核心期刊收录，是为1，否为0',\n" +
                "  `is_cs` int(1) DEFAULT NULL COMMENT '是否威望指数SJR期刊收录，是为1，否为0',\n" +
                "  `is_cscd` int(1) DEFAULT NULL COMMENT '是否CSCD期刊收录，是为1，否为0',\n" +
                "  `is_jcr` int(1) DEFAULT NULL COMMENT '是否是sci收录期刊',\n" +
                "  `is_pubmed` int(1) DEFAULT NULL COMMENT '是否PubMed期刊收录，是为1，否为0',\n" +
                "  `is_tjy` int(1) DEFAULT NULL COMMENT '是否统计源期刊收录，是为1，否为0',\n" +
                "  `is_yiigle` int(1) DEFAULT NULL COMMENT '中华医学系列收录',\n" +
                "  `is_zky` int(1) DEFAULT NULL COMMENT '是否中科院期刊收录，是为1，否为0',\n" +
                "  `zky_subject` text COMMENT '中科院大区名称',\n" +
                "  `is_core` int(1) DEFAULT NULL COMMENT '核心1，非核心0',\n" +
                "  `mail_list` text COMMENT '邮箱信息，是一个集合',\n" +
                "  `subject` text COMMENT '用于数据分析时的学科字段，类型与WOS中的WC字段，可代替wos_wc字段',\n" +
                "  `kw_plus` text COMMENT '类似wos中的Keywords Plus关键词ID字段，用于数据分析',\n" +
                "  `times_cited` int(11) DEFAULT NULL COMMENT '被引次数，这个TC是泉方计算出来的，不是WOS的TC数据',\n" +
                "  `language` text COMMENT '论文的语种',\n" +
                "  `references` longtext COMMENT '参考文献的pid集合',\n" +
                "  `citations` longtext COMMENT '施引文献的pid集合',\n" +
                "  `is_china_hosp` int(1) DEFAULT NULL COMMENT '是否中国医院论文，是为1',\n" +
                "  `is_guidelines` int(1) DEFAULT NULL COMMENT '是否pubmed收录的临床指南论文，是为1',\n" +
                "  `is_pubmed_article` int(1) DEFAULT NULL COMMENT '是否是pubmed收录的论文，是为1',\n" +
                "  `is_6year` int(1) DEFAULT NULL COMMENT '是否是自2019年以来的论文，是为1',\n" +
                "  `pm_ad` longtext COMMENT 'PubMed的作者地址信息集合即AD字段',\n" +
                "  `ncbi_subject` longtext COMMENT 'ncbi的期刊学科',\n" +
                "  `ncbi_journal` text COMMENT 'ncbi的abbr期刊',\n" +
                "  `ncbi_mesh` longtext COMMENT 'ncbi的期刊mesh',\n" +
                "  `web_site` text COMMENT 'doi号跳转后的主域名，用于出版社统计',\n" +
                "  `cn_country` text COMMENT '发文国家的中文名称的List集合',\n" +
                "  `early_warning` int(1) DEFAULT NULL COMMENT '是否2024中科院版的预警期刊，是为1，否为0',\n" +
                "  `is_fund` int(1) DEFAULT NULL COMMENT '是否是历史基金论文',\n" +
                "  `fund_auth` longtext COMMENT '历史基金论文的作者信息',\n" +
                "  `url` longtext,\n" +
                "  PRIMARY KEY (`id`)\n" +
                ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;";
        Db.use().execute("use " + newDataName + ";");
        try {
            Db.use().execute(sql);
            System.out.println("表创建成功：" + " unified_search_summary_" + batch + "_temp");
        } catch (SQLException e) {
//            throw new RuntimeException(e);
        }
    }

}
